<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统设置 - 企业管理系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <style>
        .settings-container {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 20px;
            margin-bottom: 20px;
        }
        
        .page-title {
            font-size: 22px;
            margin-bottom: 20px;
            color: #2c3e50;
            display: flex;
            align-items: center;
        }
        
        .page-title i {
            margin-right: 10px;
            color: #3498db;
        }
        
        .settings-tabs {
            display: flex;
            border-bottom: 1px solid #eee;
            margin-bottom: 20px;
        }
        
        .tab {
            padding: 10px 20px;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.3s;
        }
        
        .tab.active {
            border-bottom: 2px solid #3498db;
            color: #3498db;
            font-weight: 500;
        }
        
        .tab:hover:not(.active) {
            border-bottom: 2px solid #ddd;
        }
        
        .settings-section {
            display: none;
            margin-bottom: 30px;
        }
        
        .settings-section.active {
            display: block;
        }
        
        .section-title {
            font-size: 18px;
            margin: 20px 0 15px;
            color: #2c3e50;
            display: flex;
            align-items: center;
        }
        
        .section-title i {
            margin-right: 8px;
            color: #7f8c8d;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        .form-control {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }
        
        .form-control:focus {
            border-color: #3498db;
            outline: none;
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }
        
        textarea.form-control {
            min-height: 120px;
            resize: vertical;
        }
        
        .form-row {
            display: flex;
            gap: 20px;
        }
        
        .form-row .form-group {
            flex: 1;
        }
        
        .btn {
            padding: 10px 20px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.3s;
            font-size: 14px;
        }
        
        .btn:hover {
            background: #2980b9;
        }
        
        .btn-secondary {
            background: #95a5a6;
        }
        
        .btn-secondary:hover {
            background: #7f8c8d;
        }
        
        .btn-group {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }
        
        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 24px;
        }
        
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 24px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: #3498db;
        }
        
        input:checked + .slider:before {
            transform: translateX(26px);
        }
        
        .settings-card {
            background: #f8f9fa;
            border-radius: 6px;
            padding: 15px;
            margin-bottom: 15px;
        }
        
        .settings-card h4 {
            margin-bottom: 10px;
            color: #2c3e50;
        }
    </style>
</head>
<body>
    <div class="settings-container">
        <h1 class="page-title"><i class="bi bi-gear"></i>系统设置</h1>
        
        <div class="settings-tabs">
            <div class="tab active" data-tab="basic">基本设置</div>
            <div class="tab" data-tab="security">安全设置</div>
            <div class="tab" data-tab="notification">通知设置</div>
            <div class="tab" data-tab="backup">备份恢复</div>
        </div>
        
        <!-- 基本设置 -->
        <div class="settings-section active" id="basic-settings">
            <div class="section-title"><i class="bi bi-building"></i> 企业信息</div>
            
            <div class="form-row">
                <div class="form-group">
                    <label>企业名称</label>
                    <input type="text" class="form-control" value="某某科技有限公司">
                </div>
                <div class="form-group">
                    <label>企业简称</label>
                    <input type="text" class="form-control" value="某某科技">
                </div>
            </div>
            
            <div class="form-group">
                <label>企业LOGO</label>
                <div style="display: flex; align-items: center; gap: 20px;">
                    <img src="https://via.placeholder.com/100x100/f5f7fa/3498db?text=LOGO" alt="企业LOGO" style="border-radius: 4px;">
                    <button class="btn">更换LOGO</button>
                    <button class="btn btn-secondary">重置</button>
                </div>
            </div>
            
            <div class="form-group">
                <label>企业简介</label>
                <textarea class="form-control">某某科技有限公司成立于2010年，专注于企业信息化解决方案的研发与服务，为客户提供全方位的技术支持。</textarea>
            </div>
            
            <div class="section-title"><i class="bi bi-display"></i> 系统显示</div>
            
            <div class="form-row">
                <div class="form-group">
                    <label>系统名称</label>
                    <input type="text" class="form-control" value="企业管理系统">
                </div>
                <div class="form-group">
                    <label>系统主题色</label>
                    <input type="color" class="form-control" value="#3498db" style="height: 40px; padding: 3px;">
                </div>
            </div>
            
            <div class="form-group">
                <label style="display: inline-block; margin-right: 15px;">启用暗黑模式</label>
                <label class="switch">
                    <input type="checkbox">
                    <span class="slider"></span>
                </label>
            </div>
            
            <div class="btn-group">
                <button class="btn">保存设置</button>
                <button class="btn btn-secondary">恢复默认</button>
            </div>
        </div>
        
        <!-- 安全设置 -->
        <div class="settings-section" id="security-settings">
            <div class="section-title"><i class="bi bi-shield-lock"></i> 登录安全</div>
            
            <div class="settings-card">
                <h4>密码策略</h4>
                <div class="form-group">
                    <label>密码最小长度</label>
                    <input type="number" class="form-control" value="8" min="6" max="20">
                </div>
                
                <div class="form-group">
                    <label style="display: inline-block; margin-right: 15px;">必须包含数字</label>
                    <label class="switch">
                        <input type="checkbox" checked>
                        <span class="slider"></span>
                    </label>
                </div>
                
                <div class="form-group">
                    <label style="display: inline-block; margin-right: 15px;">必须包含特殊字符</label>
                    <label class="switch">
                        <input type="checkbox">
                        <span class="slider"></span>
                    </label>
                </div>
                
                <div class="form-group">
                    <label>密码有效期(天)</label>
                    <input type="number" class="form-control" value="90" min="30" max="365">
                </div>
            </div>
            
            <div class="settings-card">
                <h4>登录限制</h4>
                <div class="form-group">
                    <label style="display: inline-block; margin-right: 15px;">启用验证码</label>
                    <label class="switch">
                        <input type="checkbox" checked>
                        <span class="slider"></span>
                    </label>
                </div>
                
                <div class="form-group">
                    <label style="display: inline-block; margin-right: 15px;">启用双因素认证</label>
                    <label class="switch">
                        <input type="checkbox">
                        <span class="slider"></span>
                    </label>
                </div>
                
                <div class="form-group">
                    <label>最大登录失败次数</label>
                    <input type="number" class="form-control" value="5" min="1" max="10">
                </div>
                
                <div class="form-group">
                    <label>锁定时间(分钟)</label>
                    <input type="number" class="form-control" value="30" min="5" max="1440">
                </div>
            </div>
            
            <div class="btn-group">
                <button class="btn">保存设置</button>
            </div>
        </div>
        
        <!-- 通知设置 -->
        <div class="settings-section" id="notification-settings">
            <div class="section-title"><i class="bi bi-bell"></i> 通知方式</div>
            
            <div class="settings-card">
                <h4>系统通知</h4>
                <div class="form-group">
                    <label style="display: inline-block; margin-right: 15px;">站内消息</label>
                    <label class="switch">
                        <input type="checkbox" checked>
                        <span class="slider"></span>
                    </label>
                </div>
                
                <div class="form-group">
                    <label style="display: inline-block; margin-right: 15px;">电子邮件</label>
                    <label class="switch">
                        <input type="checkbox" checked>
                        <span class="slider"></span>
                    </label>
                </div>
                
                <div class="form-group">
                    <label style="display: inline-block; margin-right: 15px;">手机短信</label>
                    <label class="switch">
                        <input type="checkbox">
                        <span class="slider"></span>
                    </label>
                </div>
            </div>
            
            <div class="settings-card">
                <h4>通知模板</h4>
                <div class="form-group">
                    <label>订单创建通知</label>
                    <textarea class="form-control">尊敬的{username}，您的订单{order_id}已创建，订单金额：{amount}元，预计发货时间：{delivery_time}。</textarea>
                </div>
                
                <div class="form-group">
                    <label>订单发货通知</label>
                    <textarea class="form-control">尊敬的{username}，您的订单{order_id}已发货，物流公司：{shipping_company}，物流单号：{tracking_number}。</textarea>
                </div>
            </div>
            
            <div class="btn-group">
                <button class="btn">保存设置</button>
            </div>
        </div>
        
        <!-- 备份恢复 -->
        <div class="settings-section" id="backup-settings">
            <div class="section-title"><i class="bi bi-database"></i> 数据备份</div>
            
            <div class="settings-card">
                <h4>自动备份</h4>
                <div class="form-group">
                    <label style="display: inline-block; margin-right: 15px;">启用自动备份</label>
                    <label class="switch">
                        <input type="checkbox" checked>
                        <span class="slider"></span>
                    </label>
                </div>
                
                <div class="form-group">
                    <label>备份频率</label>
                    <select class="form-control">
                        <option>每天</option>
                        <option selected>每周</option>
                        <option>每月</option>
                    </select>
                </div>
                
                <div class="form-group">
                    <label>备份时间</label>
                    <input type="time" class="form-control" value="02:00">
                </div>
                
                <div class="form-group">
                    <label>保留备份数量</label>
                    <input type="number" class="form-control" value="7" min="1" max="30">
                </div>
            </div>
            
            <div class="section-title"><i class="bi bi-arrow-clockwise"></i> 手动备份与恢复</div>
            
            <div style="display: flex; gap: 15px; margin-bottom: 20px;">
                <button class="btn"><i class="bi bi-download"></i> 立即备份</button>
                <button class="btn btn-secondary"><i class="bi bi-upload"></i> 恢复数据</button>
            </div>
            
            <table style="width: 100%; border-collapse: collapse;">
                <thead>
                    <tr style="background: #f8f9fa;">
                        <th style="padding: 10px; text-align: left;">备份名称</th>
                        <th style="padding: 10px; text-align: left;">备份时间</th>
                        <th style="padding: 10px; text-align: left;">大小</th>
                        <th style="padding: 10px; text-align: left;">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr style="border-bottom: 1px solid #eee;">
                        <td style="padding: 10px;">backup_20230615.sql</td>
                        <td style="padding: 10px;">2023-06-15 02:00:15</td>
                        <td style="padding: 10px;">45.6 MB</td>
                        <td style="padding: 10px;">
                            <button style="background: none; border: none; color: #3498db; cursor: pointer;">下载</button>
                            <button style="background: none; border: none; color: #3498db; cursor: pointer;">恢复</button>
                            <button style="background: none; border: none; color: #e74c3c; cursor: pointer;">删除</button>
                        </td>
                    </tr>
                    <tr style="border-bottom: 1px solid #eee;">
                        <td style="padding: 10px;">backup_20230608.sql</td>
                        <td style="padding: 10px;">2023-06-08 02:00:12</td>
                        <td style="